home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / osr5 / sco / scripts / doc / exp.LOCAL
Encoding:
Text File  |  1997-08-26  |  16.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))               XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
  5.  
  6.  
  7.  
  8.      NNNNaaaammmmeeee
  9.           exp - process an expenses file.
  10.  
  11.      DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  12.           eeeexxxxpppp processes an expenses file.  The expenses file consists
  13.           of records describing expenses which were payed for by
  14.           certain parties and which are owed for by some other set of
  15.           parties.  eeeexxxxpppp uses information on who payed for each expense
  16.           and who the parties to the expense were to calculate, for
  17.           each party, a net amount of money owed by or to a
  18.           coordinator.  For simplicity, all balances are calculated
  19.           relative to the coordinator.  A net amount owed by a party
  20.           is shown as a positive amount owed by that party to the
  21.           coordinator; a net amount owed to a party is shown as a
  22.           negative amount owed by that party to the coordinator.
  23.           After the file has been processed, the amounts owed are
  24.           printed.  The only users reported on are those who are
  25.           currently in the AAAAllllllll set (see below) and those who have an
  26.           outstanding balance whose absolute value is greater than or
  27.           equal to the minimum report balance, by default $0.02.  This
  28.           can be changed with the -M option.
  29.  
  30.      SSSSyyyynnnnttttaaaaxxxx
  31.           exp [-bchlrRtTV] [-p<party,...>] [-P<payment-types>]
  32.                [-M<min-amt>] [-s<start-date>] [-e<end-date>]
  33.                [expenses-file ...]
  34.  
  35.           If no expenses-file is given, the default filename eeeexxxxppppeeeennnnsssseeeessss
  36.           is used.  It is expected to be found in the directory
  37.           ////llllooooccccaaaallll////lllliiiibbbb////hhhhoooouuuusssseeee.  If the environment variable HHHHOOOOUUUUSSSSEEEELLLLIIIIBBBB is
  38.           set, it is used instead of ////llllooooccccaaaallll////lllliiiibbbb////hhhhoooouuuusssseeee.
  39.  
  40.      OOOOppppttttiiiioooonnnnssss
  41.           ----bbbb  Print totals in a brief format, suitable for processing
  42.               by another utility.
  43.  
  44.           ----cccc  Generate carryover output, suitable for starting a new
  45.               expenses file.
  46.  
  47.           ----hhhh  Print help information.
  48.  
  49.           ----llll  Print the date of the last payment by each party in the
  50.               last AAAAllllllll group defined.  A payment is a negative cost
  51.               owed by a single party to the coordinator.
  52.  
  53.           ----rrrr  Print a running display of lines from the expenses file
  54.               as they are processed.
  55.  
  56.           ----tttt  Like -r, but prints only as many lines as will fit on
  57.               the screen (the last lines processed), and truncates
  58.               them to the screen width.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/8/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))               XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
  71.  
  72.  
  73.  
  74.           ----RRRR,,,, ----TTTT
  75.               Like -r and -t, except that nonzero amounts owed by each
  76.               party are printed after each record is processed.
  77.  
  78.           ----ssss<<<<ssssttttaaaarrrrtttt----ddddaaaatttteeee>>>>
  79.               Process only records with a date equal to or later than
  80.               <start-date>.  <start-date> should be given in the form
  81.               yy/mm/dd.
  82.  
  83.           ----eeee<<<<eeeennnndddd----ddddaaaatttteeee>>>>
  84.               Process only records with a date equal to or earlier
  85.               than <end-date>.  <end-date> should be given in the form
  86.               yy/mm/dd.
  87.  
  88.           ----pppp<<<<ppppaaaarrrrttttyyyy,,,,............>>>>
  89.               Process expenses only for the parties given in the
  90.               comma-separated list.
  91.  
  92.           ----PPPP<<<<ppppaaaayyyymmmmeeeennnntttt----ttttyyyyppppeeee>>>>
  93.               Process only records that match one of the comma-
  94.               separated types in <payment-type>.  Payment types
  95.               consist of one character from _b_t and/or one from _p_n.  _b
  96.               and _t select records which include any of the parties
  97.               given with -p in the owed-by or owed-to field
  98.               respectively; they should only be used if -p is given.
  99.               If a party is in both the owed-by and owed-to fields, _b
  100.               will select the record if the party represents a larger
  101.               fraction of the owed-by field than the owed-to field,
  102.               while _t will do the opposite of this.  If the party
  103.               represents the same fraction of both fields, it is not
  104.               selected in either case.  _p and _n select records which
  105.               have a positive or negative amount respectively.  If
  106.               both a character from _b_t and a character from _p_n are
  107.               given in one payment type (e.g.  _b_p), both of the
  108.               conditions specified must be true for a record to match
  109.               that payment-type specifier.  If more than one payment-
  110.               type is given (e.g.  _b,_t_n), a record will be selected if
  111.               it matches any of the payment types.  A payment type of
  112.               _P is short for _b_p,_t_n which selects records that specify
  113.               a net positive amount owed by one of the -p parties; _N
  114.               is short for the opposite of this.
  115.  
  116.           ----MMMM<<<<mmmmiiiinnnn----aaaammmmtttt>>>>
  117.               Set the minimum report balance to <min-amount>, given in
  118.               dollars (a decimal fraction can be use to give cents).
  119.  
  120.           ----VVVV  Verbose report; print details of transfer directions,
  121.               averages, etc.  At the end of file processing, a report
  122.               is generated for every party encountered, including the
  123.               coordinator and those no longer part of AAAAllllllll.  This may
  124.               be limited by giving a party list with the -p option.
  125.               For each party, the amount of time that the party was
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/8/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))               XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
  137.  
  138.  
  139.  
  140.               part of the expense system is printed, in various units
  141.               (days, weeks, months, and years).  This is derived from
  142.               the assignments to AAAAllllllll, so every AAAAllllllll assignment must
  143.               have a date in order for this option to be used.  This
  144.               is followed by a breakdown of expenses that the party
  145.               was party to, by expense type.  For each expense type,
  146.               the total amount is printed, along with the average by
  147.               day, week, month, and year.  The expense types are the
  148.               same as those described for the -P option, and
  149.               conglomerations of them.  The expense types are:
  150.  
  151.               oooowwwweeeedddd----bbbbyyyy,,,, oooowwwweeeedddd----ttttoooo
  152.                    Expenses in which the party represented a larger
  153.                    fraction of the owed-by field than the owed-to
  154.                    field, and vice versa.
  155.  
  156.               nnnneeeeggggaaaattttiiiivvvveeee,,,, ppppoooossssiiiittttiiiivvvveeee
  157.                    Expenses in which the cost was a negative value and
  158.                    those in which the cost was a positive value.
  159.  
  160.               oooowwwweeeedddd----bbbbyyyy////oooowwwweeeedddd----ttttoooo nnnneeeeggggaaaattttiiiivvvveeee////ppppoooossssiiiittttiiiivvvveeee
  161.                    Expenses in which both of the named conditions were
  162.                    true.
  163.  
  164.               ddddeeeebbbbiiiittttssss,,,, ccccrrrreeeeddddiiiittttssss
  165.                    Expenses which resulted in a net debit to the party
  166.                    (both owed-by positive and owed-to negative types),
  167.                    and which resulted in a net credit to the party
  168.                    (both owed-by negative and owed-to positive types).
  169.  
  170.      FFFFiiiilllleeee ffffoooorrrrmmmmaaaatttt
  171.           Input files consist of single-line records with one of the
  172.           two following formats:
  173.  
  174.           DDDDAAAATTTTEEEE<sep>CCCCOOOOSSSSTTTT<sep>PPPPAAAARRRRTTTTIIIIEEEESSSS<sep>[PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS]<sep>DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  175.           or
  176.           [date<sep>]vvvvaaaarrrr=vvvvaaaalllluuuueeee
  177.  
  178.           DDDDAAAATTTTEEEE is used only for the ----llll and ----VVVV options.  If one of them
  179.           is going to be used, dates should be given in the form
  180.           yyyyeeeeaaaarrrr/mmmmoooonnnntttthhhh/ddddaaaayyyy or mmmmoooonnnntttthhhh/ddddaaaayyyy.  If the latter form is used, a
  181.           value must be assigned to variable YYYYeeeeaaaarrrr (see below).  CCCCOOOOSSSSTTTT
  182.           is a decimal value giving dollars and cents, with no leading
  183.           $ symbol.  PPPPAAAARRRRTTTTIIIIEEEESSSS is a list of parties to the expense,
  184.           separated by commas.  It may also specify that some parties
  185.           are to be subtracted, e.g. AAAAllllllll----FFFFoooooooo is a list of parties that
  186.           includes those in the alias AAAAllllllll (see below) except for FFFFoooooooo.
  187.           PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS has the same format as PPPPAAAARRRRTTTTIIIIEEEESSSS and lists those
  188.           who payed for the expense.  If any of the purchasers are
  189.           also parties to to expense (as they usually are), they
  190.           should also be included in PPPPAAAARRRRTTTTIIIIEEEESSSS.  If a record has only
  191.           four fields, PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS is set to be the coordinator.  If a
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/8/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))               XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
  203.  
  204.  
  205.  
  206.           party payed for or owes for more than one share of an
  207.           expense, that party may be listed more than once in PPPPAAAARRRRTTTTIIIIEEEESSSS
  208.           or PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS.  DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN is a description of the expense;
  209.           it is not used.  The default field separator <sep> is one or
  210.           more tabs or spaces, except that the separator immediately
  211.           before the comment field must be a tab so that spaces in the
  212.           comment won't cause the first word of the comment field to
  213.           be interpreted as the optional PPPPUUUURRRRCCCCHHHHAAAASSSSEEEERRRRSSSS field (by default,
  214.           only the comment field can contain spaces).  If the field
  215.           separator is changed, none of this special behaviour
  216.           applies.
  217.  
  218.           Lines of the form vvvvaaaarrrr=vvvvaaaalllluuuueeee assign values to variables.
  219.           Variable assignments may be preceded by a date.  This can
  220.           make it easier to sort the file.  However, the date of an
  221.           assignment is used only for assignments to the AAAAllllllll variable
  222.           (see below).  The value of the variable YYYYeeeeaaaarrrr is used for
  223.           lines that do not include a year in the date. YYYYeeeeaaaarrrr need not
  224.           be assigned a value if all dates include a year or if the ----pppp
  225.           and ----VVVV options will not be used.  The variable SSSSeeeepppp can be
  226.           used to define a field separator.  It should be a regular
  227.           expression in the manner of aaaawwwwkkkk.  For example, to make the
  228.           field separator be one or more tabs, use
  229.           Sep=\t+
  230.           If the variable OwedBy is set, expenses lines should not
  231.           included a PARTIES field.  All expenses will be charged to
  232.           the party specified by the OwedBy variable.  If the variable
  233.           OwedTo is set, expenses lines should not included a
  234.           PURCHASERS field, and the separator before the comment field
  235.           need not be a tab.  All expenses will be charged to the
  236.           party specified by the OwedTo variable.  Any other variable
  237.           assignments define aliases which may be used whereever
  238.           parties are.  The value part should have the form:
  239.           name,name,name...  Aliases may reference other aliases but
  240.           there must not be any loops.  Aliases may be redefined
  241.           throughout the file.  Aliases that are defined before any
  242.           expense records are printed before the column header is
  243.           printed.
  244.  
  245.           The special alias AAAAllllllll must be set before any expense records
  246.           occur.  Any names that occur either directly or in other
  247.           aliases must exist in AAAAllllllll; it determines what names are
  248.           valid.  The first name on the right hand side of the first
  249.           definition of AAAAllllllll is that of the coordinator, with respect
  250.           to whom all balances are calculated.  All names are case-
  251.           insensitive.  The first instance of a name determines the
  252.           case with which it is printed.  Assigments to AAAAllllllll should
  253.           generally include a date, because the ----VVVV (verbose) option
  254.           uses the period in which each party was a member of AAAAllllllll to
  255.           determine the amount of time that the party was part of the
  256.           expenses system, so that averages by time may be calculated.
  257.           If any AAAAllllllll assignment does not include a date, the ----VVVV option
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 10/8/95)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))               XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                eeeexxxxpppp((((LLLLOOOOCCCCAAAALLLL))))
  269.  
  270.  
  271.  
  272.           will abort.
  273.  
  274.           Lines that begin with #### are comments and are ignored, as are
  275.           blank (empty) lines.
  276.  
  277.      EEEExxxxaaaammmmpppplllleeee
  278.           92/01/01  All=John,Bela,Irene,MikeTh,Dan
  279.           Paper=John,Bela,Irene
  280.           92/01/01  271.31    Bela Carryover
  281.           92/01/01  109.34    MikeTh    Carryover
  282.           92/01/20  56.07     Paper     Sentinel (26 weeks)
  283.           92/01/12  6.01 John,Bela,Irene     Bela Groceries
  284.           92/01/13  6.00 Irene     Bela Safeway
  285.           92/01/18  1.00 All  Paper towels
  286.           92/01/24  -247.70   Irene     Payment for expenses
  287.           92/01/24  0.95 All-Irene,John Toilet paper
  288.           92/02/01  -150.00   Bela Payment for expenses
  289.           92/02/01  42.29     John,Bela,Irene     Bela Groceries
  290.  
  291.      AAAAuuuutttthhhhoooorrrr
  292.           John DuBois <john@armory.com>
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 10/8/95)
  328.  
  329.  
  330.  
  331.